package demo;

import javax.swing.tree.TreeNode;
import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-06-22
 * Time: 10:36
 */


public class TestBinaryTree {

    public static void main(String[] args) {
        //利用穷举法来创建一颗二叉树
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        System.out.println(binaryTree.isCompleteTree(root));
    }

   public static void main1(String[] args){
       //利用穷举法来创建一颗二叉树
       BinaryTree binaryTree = new BinaryTree();
       BinaryTree.TreeNode root = binaryTree.createTree();
//       binaryTree.preOrder(root);
//       System.out.println();
//       binaryTree.inOrder(root);
//       System.out.println();
//       binaryTree.postOrder(root);
//        System.out.println(binaryTree.size2(root));
//       System.out.println(BinaryTree.cnt);
//       System.out.println(binaryTree.getLeafNodeCount2(root));
//       System.out.println(BinaryTree.leafSize);
//      BinaryTree.TreeNode ret = binaryTree.find(root,6);
//      if(ret!=null) {
//          System.out.println(ret.val);
//      }else {
//          System.out.println("错");
//      }
        binaryTree.levelOrder2(root);
   }

}
